<?php
require_once ('odal/node.php');
require_once ('odal/meta/datatype.php');


/**
 * @version 1.0
 * @created 27-Dez-2003 21:35:25
 */
class odal_SimpleAttribute extends odal_Node{

	/**
	 * type of datatype
	 *
	 * the following types exist:<br>
	 * string: max 4000<br>
	 * text: CLOB<br>
	 * date: YYYY-MM-DD HH:MM:SS.000<br>
	 * integer:<br>
	 * float:<br>
	 * money: N.==<br>
	 * boolean: true/false<br>
	 * binary: BLOB<br>
	 * 
	 */
	var $m_datatype;
	var $m_scheme;
	/**
	 * Type of Value
	 *
	 * b = Blob<br>
	 * c = Clob<br>
	 * s = simple
	 *
	 */
	var $m_valuetype;

	

	function odal_SimpleAttribute( &$scheme, &$datatype, $id, $name, $creatingDate = null, $creater = 0, $modifyingDate = null, $modifier = 0 ){
		$this->_createSimpleAttribute( $scheme, $datatype, $id, $name, $creatingDate, $creater, $modifyingDate, $modifier );
	}//odal_SimpleAttribute

	function _createSimpleAttribute( &$scheme, &$datatype, $id, $name, $creatingDate, $creater, $modifyingDate, $modifier ){
		$this->m_scheme =& $scheme;
		$this->m_valuetype = $datatype->getValuetype();
		//echo "(simpleattribute->_createSimpleAttribute) this->getValuetype(): " . $this->getValuetype() . "<br>";
		$this->m_datatype =& $datatype;
		$this->m_id = $id;
		$this->m_name = $name;
		$this->m_creatingDate = $creatingDate;
		$this->m_creater = $creater;
		$this->m_modifyingDate = $modifyingDate;
		$this->m_modifier = $modifier;
	}//_createSimpleAttribute

	function & getDatatype(){
		return $this->m_datatype;
	}//getDatatype

	function & getScheme(){
		return $this->m_scheme;
	}//getScheme

	function getValuetype(){
		return $this->m_valuetype;
	}//getValuetype


}//odal_SimpleAttribute
?>